﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using study.BLL;
using study.DAL;
using study.Model;
using System.Data;
using System.Text;

namespace Web.controls
{
    public partial class head : System.Web.UI.UserControl
    {
        study.BLL.tb_menu bll = new study.BLL.tb_menu();
        protected void Page_Load(object sender, EventArgs e)
        {
            BindData();
        }

        public void BindData()
        {
         
        }

        protected void bl_Menu_Click(object sender, BulletedListEventArgs e)
        {
            
            Session["MENU_SELECTED"] = e.Index.ToString();
            Response.Redirect(bl_Menu.Items[e.Index].Value.ToString());
        }

        protected void bl_Menu_PreRender(object sender, EventArgs e)
        {
            int index = Convert.ToInt32(Session["MENU_SELECTED"].ToString());
            bl_Menu.Items[index].Attributes.Add("class", "selected");
        }
    }
}